package com.hns.can.common.constants;

import java.util.Hashtable;
import java.util.List;
import java.util.Map;

import com.hns.can.base.entity.SysAuthrityFieldValueEntity;

public abstract class SysCache {
    private static final Map<String, List<SysAuthrityFieldValueEntity>> AUTHRITY_FIELD_VALUE = new Hashtable<String, List<SysAuthrityFieldValueEntity>>();
    
    public static List<SysAuthrityFieldValueEntity> getAuthrityFieldValue(String userId) {
    	return AUTHRITY_FIELD_VALUE.get(userId);
    }
    
    public static void setAuthrityFieldValue(String userId, List<SysAuthrityFieldValueEntity> authFieldValue) {
		AUTHRITY_FIELD_VALUE.put(userId, authFieldValue);
    }
    
    public static void clearAuthrityFieldValue(String userId) {
    	if(AUTHRITY_FIELD_VALUE.containsKey(userId)) {
    		AUTHRITY_FIELD_VALUE.remove(userId);
    	}
    }
    
}
